﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trasitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="~/css/table.css" rel="stylesheet" />
    <link href="~/css/cwcalendar.css" rel="stylesheet" />
    <script src="~/javascript/calendar-ch.js"></script>
    <script src="~/javascript/comm/comm.js"></script>
    <script src="~/javascript/comm/list.js"></script>
    <script src="~/javascript/jquery-1.7.2.js"></script>
    <script src="~/javascript/locate.js"></script>
    <script src="~/javascript/select.js"></script>

</head>
<body>
    <div id="app">
        <form id="form1">
            <input type="hidden" name="emajorRelease.mreId" value="531" />
            <table width="100%">
                <tr>
                    <td>
                        <font color="black">您正在做的业务是：人力资源--招聘管理--职位发布管理--职位发布查询--详细  </font>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <input type="button" value="确认申请" v-on:click="Add()" class="BUTTON_STYLE1" />
                        <input type="button" value="返回" class="BUTTON_STYLE1" onclick="history.back();">
                    </td>
                </tr>
            </table>
            <table width="100%" border="1" cellpadding=0 cellspacing=1
                   bordercolorlight=#848284 bordercolordark=#eeeeee
                   class="TABLE_STYLE1">
                <tr hidden>
                    <td width="19%" class="TD_STYLE1">
                        编号
                    </td>
                    <td width="81%" class="TD_STYLE2">
                        <input type="text" id="mre_id" name="mre_id" v-model="mre_id" hidden />
                    </td>
                </tr>

                <tr>
                    <td class="TD_STYLE1" width="11%">
                        I级机构
                    </td>
                    <td width="14%" class="TD_STYLE2">
                        <input type="hidden" id="first_kind_id" name="first_kind_id" v-model="first_kind_id" value="01" />
                        <input type="text" id="first_kind_name" name="first_kind_name" v-model="first_kind_name" readonly="readonly" class="INPUT_STYLE1" value="集团">
                    </td>
                    <td width="11%" class="TD_STYLE1">
                        II级机构
                    </td>
                    <td width="14%" class="TD_STYLE2">
                        <input type="hidden" v-model="second_kind_id" id="second_kind_id" name="second_kind_id" />
                        <input type="text" v-model="second_kind_name" id="second_kind_name" name="second_kind_name" class="INPUT_STYLE1" />
                    </td>
                    <td width="11%" class="TD_STYLE1">
                        III级机构
                    </td>
                    <td class="TD_STYLE2">
                        <input type="hidden" readonly="readonly" class="INPUT_STYLE1" v-model="third_kind_id" id="third_kind_id" name="third_kind_id" />
                        <input type="text" readonly="readonly" class="INPUT_STYLE1" v-model="third_kind_name" id="third_kind_name" name="third_kind_name" />
                    </td>
                    <td width="11%" class="TD_STYLE1">
                        招聘类型
                    </td>
                    <td class="TD_STYLE2" colspan="2">

                        <select name="engage_type" id="engage_type" class="SELECT_STYLE1" v-model="engage_type">
                            <option value="校园招聘">校园招聘</option>

                            <option value="社会招聘">社会招聘</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        职位分类
                    </td>
                    <td class="TD_STYLE2">
                        <input type="hidden" name="major_kind_id" id="major_kind_id" v-model="major_kind_id" />
                        <input type="text" id="major_kind_name" name="major_kind_name" v-model="major_kind_name" class="INPUT_STYLE1" />
                    </td>
                    <td class="TD_STYLE1">
                        职位名称
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" id="major_name" name="major_name" v-model="major_name" class="INPUT_STYLE1" />
                        <input type="hidden" name="major_id" id="major_id" v-model="major_id" />
                    </td>
                    <td class="TD_STYLE1">
                        招聘人数
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" name="human_amount" id="human_amount" v-model="human_amount" class="INPUT_STYLE2">
                    </td>
                    <td class="TD_STYLE1">
                        截止日期
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" name="deadline" v-model="deadline" class="INPUT_STYLE2" id="deadline" onclick="aa('deadline')">
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        登记人
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" name="register" value="susu" v-model="register" class="INPUT_STYLE2">
                    </td>
                    <td class="TD_STYLE1">
                        登记时间
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" name="regist_time"
                               id="regist_time" readonly="readonly" v-model="regist_time"
                               class="INPUT_STYLE2">
                    </td>
                    <td>&nbsp; </td>
                    <td>&nbsp; </td>
                    <td>&nbsp; </td>
                    <td>&nbsp; </td>

                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        职位描述
                    </td>
                    <td class="TD_STYLE2" colspan="8">
                        <textarea name="major_describe" id="major_describe" v-model="major_describe" rows="4" cols="80" class="TEXTAREA_STYLE1"></textarea>
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        招聘要求
                    </td>
                    <td class="TD_STYLE2" colspan="8">
                        <textarea name="engage_required" id="engage_required" v-model="engage_required" rows="4" cols="80" class="TEXTAREA_STYLE1"></textarea>
                    </td>

                </tr>
            </table>
        </form>
    </div>
</body>
</html>
<script type="text/javascript">
    var vm = new Vue({
        el: "#app",
        data: {
            mre_id:"",
            first_kind_id: "",
            first_kind_name: "",
            second_kind_id: "",
            second_kind_name: "",
            third_kind_id: "",
            third_kind_name: "",
            engage_type: "",
            major_kind_id: "",
            major_kind_name: "",
            major_id: "",
            major_name: "",
            human_amount: "",
            engage_type: "",
            deadline: "",
            changer: "",
            change_time:"",
            register: "",
            regist_time: "",
            major_describe: "",
            engage_required: "",
        },
        methods: {
             load: function () {
                var t = this;
                $.ajax({
                    url: "/position/position_release_details1",
                    type: "Post",
                    data:"id="+@ViewData["id"],
                    success: function (msg) {
                        var dt = eval("("+msg+")");
                        t.mre_id = dt.mre_id;
                        t.second_kind_name = dt.second_kind_name;
                        t.second_kind_id = dt.second_kind_id;
                        t.first_kind_id = dt.first_kind_id;
                        t.first_kind_name = dt.first_kind_name;
                        t.third_kind_id = dt.third_kind_id;
                        t.third_kind_name = dt.third_kind_name;
                        t.major_kind_id = dt.major_kind_id;
                        t.major_kind_name = dt.major_kind_name;
                        t.major_id = dt.major_id;
                        t.major_name = dt.major_name;
                        t.human_amount = dt.human_amount;
                        t.engage_type = dt.engage_type;
                        t.deadline = dt.deadline;
                        t.register = dt.register;
                        t.changer = dt.changer;
                        t.regist_time = dt.regist_time;
                        t.change_time = dt.change_time;
                        t.major_describe = dt.major_describe;
                        t.engage_required = dt.engage_required;
                    }
                });
            },
            Add: function () {
                //var human_major_kind_id = $("#major_kind_id option:selected").text();
                //$("#major_kind_name").val(human_major_kind_id);
                //var human_major_id = $("#major_id option:selected").text();
                //$("#major_name").val(human_major_id);
                //alert(hunma_major_name);

                var engage_type = $("#engage_type").text();
                var human_major_id = $("#major_id").val();
                var hunma_major_name = $("#major_name").val();
                var human_major_kind_id = $("#major_kind_id").val();
                var human_major_kind_name = $("#major_kind_name").val();
                $.ajax({
                    url: "/resume/register?major_kind_id=" + human_major_kind_id + "&major_kind_name=" + human_major_kind_name + "&major_id=" + human_major_id + "&major_name=" + hunma_major_name + "&engage_type=" + engage_type,
                    type: "Post",
                    data: human_major_kind_id, human_major_kind_name, hunma_major_name,major_id,engage_type,
                    success: function (msg) {
                        window.location.href = "/resume/register?major_kind_id=" + human_major_kind_id + "&major_kind_name=" + human_major_kind_name + "&major_id=" + human_major_id + "&major_name=" + hunma_major_name + "&engage_type=" + engage_type;
                    }
                })
            },
        },
        mounted: function () {
            this.load();
        }
    });
</script>




